package com.homer.iot.esptouch.model;

public class SlaverAlloc {

	public static Slaver alloc(String id, int type) {
		switch (type) {
		case 1:
			return new Plug(id, type + "");
		case 2:
			return new DoorContact(id, type + "");
		case 3:
			return new Infrared(id, type + "");
		case 4:
			return new SoundAndLightAlarm(id, type + "");
		case 5:
			return new ColorLamp(id, type + "");
		case 6:
			return new Relay(id, type + "");
		case 7:
			return new TemperatureSensor(id, type + "");
		case 8:
			return new HumiditySensor(id, type + "");
		case 9:
			return new SmokeSensor(id, type + "");
		default:
			return new Plug(id, type + "");
		}

	}
}
